// pages/message/message.js
Page({
    options:{
        multipleSlots:true
    },
    /**
     * 页面的初始数据
     */
    data: {
        scrollHeight:0,
        active:1,
        active1:1,
        messageObj:[
            {
                id:1,
                name:'冯战',
                licensePlate:'闽A ****3',
                carName:'奥迪 A6L',
                time:'09:10',
                connent:'亲，你之前在咱家买',
                infoCount:'88'
            },
            {
                id:2,
                name:'张三',
                licensePlate:'闽A ****3',
                carName:'奥迪 A6L',
                time:'09:10',
                connent:'亲，你之前在咱家买',
                infoCount:'8'
            },
            {
                id:3,
                name:'李四',
                licensePlate:'闽A ****3',
                carName:'奥迪 A6L',
                time:'09:10',
                connent:'亲，你之前在咱家买的宝贝还满意吗？可不给…',
                infoCount:'9'
            },
            {
                id:4,
                name:'王五',
                licensePlate:'闽A ****3',
                carName:'奥迪 A6L',
                time:'09:10',
                connent:'亲，你之前在咱家买的宝贝还满意吗？可不给…',
                infoCount:'99'
            },
            {
                id:5,
                name:'孙六',
                licensePlate:'闽A ****3',
                carName:'奥迪 A6L',
                time:'09:10',
                connent:'亲，你之前在咱家买的宝贝还满意吗？可不给…',
                infoCount:'99'
            },
            {
                id:6,
                name:'冯战',
                licensePlate:'闽A ****3',
                carName:'奥迪 A6L',
                time:'09:10',
                connent:'亲，你之前在咱家买的宝贝还满意吗？可不给…',
                infoCount:'6'
            },
            {
                id:7,
                name:'冯战',
                licensePlate:'闽A ****3',
                carName:'奥迪 A6L',
                time:'09:10',
                connent:'亲，你之前在咱家买的宝贝还满意吗？可不给…',
                infoCount:'66'
            },
            {
                id:8,
                name:'冯战',
                licensePlate:'闽A ****3',
                carName:'奥迪 A6L',
                time:'09:10',
                connent:'亲，你之前在咱家买的宝贝还满意吗？可不给…',
                infoCount:'66'
            },
            {
                id:9,
                name:'冯战',
                licensePlate:'闽A ****3',
                carName:'奥迪 A6L',
                time:'09:10',
                connent:'亲，你之前在咱家买的宝贝还满意吗？可不给…',
                infoCount:'66'
            },
            {
                id:10,
                name:'冯战',
                licensePlate:'闽A ****3',
                carName:'奥迪 A6L',
                time:'09:10',
                connent:'亲，你之前在咱家买的宝贝还满意吗？可不给…',
                infoCount:'66'
            },
        ],
        contactPersonObj:[
            {
                letter:'A',
                person:[
                    {   
                        name:'冯战',
                        certification:'已认证',
                        carName:'奥迪 A6L',
                        region:'福建 福州'
                    },
                    {   
                        name:'张三',
                        certification:'未认证',
                        carName:'奥迪 A6L',
                        region:'福建 福州'
                    },
                ]
            },{
                letter:'B',
                person:[
                    {   
                        name:'冯战',
                        certification:'已认证',
                        carName:'奥迪 A6L',
                        region:'福建 福州'
                    }
                ]
            },{
                letter:'C',
                person:[
                    {   
                        name:'冯战',
                        certification:'已认证',
                        carName:'奥迪 A6L',
                        region:'福建 福州'
                    }
                ]
            },{
                letter:'D',
                person:[
                    {   
                        name:'冯战',
                        certification:'已认证',
                        carName:'奥迪 A6L',
                        region:'福建 福州'
                    }
                ]
            },{
                letter:'E',
                person:[
                    {   
                        name:'冯战',
                        certification:'已认证',
                        carName:'奥迪 A6L',
                        region:'福建 福州'
                    }
                ]
            },{
                letter:'F',
                person:[
                    {   
                        name:'冯战',
                        certification:'已认证',
                        carName:'奥迪 A6L',
                        region:'福建 福州'
                    }
                ]
            },{
                letter:'G',
                person:[
                    {   
                        name:'冯战',
                        certification:'已认证',
                        carName:'奥迪 A6L',
                        region:'福建 福州'
                    }
                ]
            },{
                letter:'H',
                person:[
                    {   
                        name:'冯战',
                        certification:'已认证',
                        carName:'奥迪 A6L',
                        region:'福建 福州'
                    }
                ]
            },{
                letter:'I',
                person:[
                    {   
                        name:'冯战',
                        certification:'已认证',
                        carName:'奥迪 A6L',
                        region:'福建 福州'
                    }
                ]
            },{
                letter:'J',
                person:[
                    {   
                        name:'冯战',
                        certification:'已认证',
                        carName:'奥迪 A6L',
                        region:'福建 福州'
                    }
                ]
            },{
                letter:'K',
                person:[
                    {   
                        name:'冯战',
                        certification:'已认证',
                        carName:'奥迪 A6L',
                        region:'福建 福州'
                    }
                ]
            },{
                letter:'L',
                person:[
                    {   
                        name:'冯战',
                        certification:'已认证',
                        carName:'奥迪 A6L',
                        region:'福建 福州'
                    }
                ]
            },{
                letter:'M',
                person:[
                    {   
                        name:'冯战',
                        certification:'已认证',
                        carName:'奥迪 A6L',
                        region:'福建 福州'
                    }
                ]
            },{
                letter:'N',
                person:[
                    {   
                        name:'冯战',
                        certification:'已认证',
                        carName:'奥迪 A6L',
                        region:'福建 福州'
                    }
                ]
            },{
                letter:'O',
                person:[
                    {   
                        name:'冯战',
                        certification:'已认证',
                        carName:'奥迪 A6L',
                        region:'福建 福州'
                    }
                ]
            },{
                letter:'P',
                person:[
                    {   
                        name:'冯战',
                        certification:'已认证',
                        carName:'奥迪 A6L',
                        region:'福建 福州'
                    }
                ]
            },{
                letter:'Q',
                person:[
                    {   
                        name:'冯战',
                        certification:'已认证',
                        carName:'奥迪 A6L',
                        region:'福建 福州'
                    }
                ]
            },{
                letter:'R',
                person:[
                    {   
                        name:'冯战',
                        certification:'已认证',
                        carName:'奥迪 A6L',
                        region:'福建 福州'
                    }
                ]
            },{
                letter:'S',
                person:[
                    {   
                        name:'冯战',
                        certification:'已认证',
                        carName:'奥迪 A6L',
                        region:'福建 福州'
                    }
                ]
            },{
                letter:'T',
                person:[
                    {   
                        name:'冯战',
                        certification:'已认证',
                        carName:'奥迪 A6L',
                        region:'福建 福州'
                    }
                ]
            },{
                letter:'U',
                person:[
                    {   
                        name:'冯战',
                        certification:'已认证',
                        carName:'奥迪 A6L',
                        region:'福建 福州'
                    }
                ]
            },{
                letter:'V',
                person:[
                    {   
                        name:'冯战',
                        certification:'已认证',
                        carName:'奥迪 A6L',
                        region:'福建 福州'
                    }
                ]
            },{
                letter:'W',
                person:[
                    {   
                        name:'冯战',
                        certification:'已认证',
                        carName:'奥迪 A6L',
                        region:'福建 福州'
                    }
                ]
            }, {
                letter:'X',
                person:[
                    {   
                        name:'冯战',
                        certification:'已认证',
                        carName:'奥迪 A6L',
                        region:'福建 福州'
                    }
                ]
            }, {
                letter:'Y',
                person:[
                    {   
                        name:'冯战',
                        certification:'已认证',
                        carName:'奥迪 A6L',
                        region:'福建 福州'
                    }
                ]
            }, {
                letter:'Z',
                person:[
                    {   
                        name:'冯战',
                        certification:'已认证',
                        carName:'奥迪 A6L',
                        region:'福建 福州'
                    }
                ]
            },
        ],
        riderDynamicObj:[
            {
              id:1,  
              name:'吴天鹏',  
              certification:'已认证',  
              carName:'宝马',  
              guanzhu:'已关注',  
              content:'已经上市了一年多的时间，已经上市了一年多的时间，已经上市了一年多的时间，上市短短时间内，它就俘获了众多粉丝，成为了消费者心中的完美车型，探岳的实力到底如何呢？接下来大家就和…',  
              time:'01-28 15:26',
              region:'福建省福州市 世欧澜山'
            },
            {
                id:2,  
                name:'吴天鹏',  
                certification:'未认证',  
                carName:'宝马',  
                guanzhu:'关注',  
                content:'已经上市了一年多的时间，已经上市了一年多的时间，已经上市了一年多的时间，上市短短时间内，它就俘获了众多粉丝，成为了消费者心中的完美车型，探岳的实力到底如何呢？接下来大家就和…',  
                comment:'估计单独陪个弹簧会好。估计单独陪个弹簧会好。',
                time:'01-28 15:26',
                region:'福建省福州市 世欧澜山'
              },
        ]
    },

    onClick(e) {
        // console.log(e.detail.title);
        this.setData({active:e.detail.title === '联系人' ? 2 :
        e.detail.title === '车友动态' ?  3  :1
    })
      },

      onClick1(e) {
        // console.log(e.detail.title);
        this.setData({active1:e.detail.title === '视频' ? 2 :
        e.detail.title === '提问' ?  3 :
        e.detail.title === '点评' ?  4 :
        e.detail.title === '关注' ?  5 : 1
    })
      },

    addPerson(){
          console.log('aa');
      },

    /**
     * 生命周期函数--监听页面加载
     */
    onLoad(options) {

    },

    /**
     * 生命周期函数--监听页面初次渲染完成
     */
    onReady() {

    },

    /**
     * 生命周期函数--监听页面显示
     */
    onShow() {
        this.getTabBar().init();
        let query = wx.createSelectorQuery();
        query.select('.message-nav').boundingClientRect();
        query.selectViewport().scrollOffset();
        query.exec(res=>{
            console.log(res);
            this.setData({
                scrollHeight:`calc(100vh - ${res[0].height}px - 84px)`
            })
        })
    },

    /**
     * 生命周期函数--监听页面隐藏
     */
    onHide() {

    },

    /**
     * 生命周期函数--监听页面卸载
     */
    onUnload() {

    },

    /**
     * 页面相关事件处理函数--监听用户下拉动作
     */
    onPullDownRefresh() {

    },

    /**
     * 页面上拉触底事件的处理函数
     */
    onReachBottom() {

    },

    /**
     * 用户点击右上角分享
     */
    onShareAppMessage() {

    }
})